Skip to content

test: Deflake L0_socket reuse-port request distribution check - #9001

Merged
yinggeh merged 3 commits into
mainfrom
devin/1791417768-l0-socket-reuseport-flake
Oct 22, 2026
Merged

yinggeh merged 3 commits into
mainfrom
devin/1791417768-l0-socket-reuseport-flake

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What does the PR do?

L0_socket starts 3 servers sharing the HTTP/gRPC port (--reuse-*-port=true), sends a single batch of 11 client processes, and fails if any server's nv_inference_request_success is 0. The kernel uses a hash to pick which SO_REUSEPORT listener gets each new connection, so with 11 connections there's roughly a 3·(2/3)^11 ≈ 5% chance per protocol that one server gets nothing. That matches the intermittent pseudo-nightly failures: gRPC counts were 0/16/6 on 10-06 and 8/14/0 on 10-02, and the runs in between passed.

Change: send batches of 11 clients until all three servers have served at least one request, up to MAX_CLIENT_ROUNDS=3. If a server still has 0 after 3 rounds, the test fails as before. A listener that really never receives connections is still caught; only the chance-based miss goes away. The test also prints the per-round counts and waits on each client PID individually. Before, wait $pids only returned the exit status of the last client, so failures in other clients went unnoticed.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging.
  • All template sections are filled out.

Commit Type:

  • test

Related PRs:

None

Where should the reviewer start?

qa/L0_socket/test.sh, the reuse-port distribution loop near the end of the file.

Test plan:

  • bash -n and pre-commit pass. I tested the loop logic locally with a fake client that assigns requests at random. I haven't run it against a real server. It needs an L0_socket--base CI run.
  • CI Pipeline ID:
    75864706
    75864846
    75865062
    75865453
    75867062
    75890914
    75890967
    75891050
    75891151
    75891185
    75891245
    75891343
    75891394
    75891433
    75892802
    75892855
    75893129
    75893186
    75893251
    75893324
    75893385
    75893444

Caveats:

In the worst case the test takes up to 3x as many client runs. In practice it almost always stops after round 1.

Background

The pseudo-nightly CI health report flagged L0_socket--base as newly broken (dl/dgx/tritonserver job 473179531).

Related Issues:

  • Relates to the pseudo-nightly L0_socket--base flake (no ticket yet)

Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/42b5577b240344db884012e785abfcc6
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/42b5577b240344db884012e785abfcc6?variant=devin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@yinggeh
yinggeh marked this pull request as ready for review October 22, 2026 14:32
@yinggeh yinggeh self-assigned this Oct 22, 2026
@yinggeh yinggeh added the PR: test Adding missing tests or correcting existing test label Oct 22, 2026
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Updates the reuse-port check in qa/L0_socket/test.sh.

  • The socket test retries request batches until every server gets traffic.
  • The socket test’s copyright notice now includes 2026.

No actionable new issues were found.

Reviews (2) · Last reviewed commit: "test: Cap L0_socket reuse-port retries a..." · Reviewed by Greptile

A third batch makes a chance miss negligible, while a listener that never accepts still fails. Ten rounds only delays that failure.

Signed-off-by: Yingge He <yinggeh@nvidia.com>
@yinggeh
yinggeh requested review from Vinya567 and whoisj October 22, 2026 17:44
@yinggeh
yinggeh merged commit d13379e into main Oct 22, 2026
4 checks passed
@yinggeh
yinggeh deleted the devin/1791417768-l0-socket-reuseport-flake branch October 22, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: test Adding missing tests or correcting existing test

Development

Successfully merging this pull request may close these issues.

2 participants